<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>安卓自动兼容测试系统</title>
<script src="/Terminator/js/jquery-3.0.0.min.js">
	
</script>
<link rel="stylesheet" href="/Terminator/css/bootstrap.css"
	type="text/css" />
<link rel="stylesheet" href="/Terminator/css/demo.css" type="text/css" />
<link rel="stylesheet" href="/Terminator/css/zTreeStyle.css"
	type="text/css" />
<link href="/Terminator/css/Share.css" rel="stylesheet" type="text/css">
<link href="/Terminator/css/testCase.css" rel="stylesheet"
	type="text/css">
<script type="text/javascript" src="/Terminator/js/weekplan1.js">
	
</script>
<script type="text/javascript" src="/Terminator/js/popup.js">
	
</script>
<script src="/Terminator/js/angular.min.js"></script>
<link href="/Terminator/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" />
<script src="/Terminator/js/moment-with-locales.min.js"></script>
<script src="/Terminator/js/bootstrap-datetimepicker.min.js">
	
</script>
<script src="/Terminator/js/ZeroClipboard.min.js"></script>
<script src="/Terminator/js/ngClip.js"></script>
<script src="/Terminator/js/bootstrap.min.js" type="text/javascript"></script>
<link href="/Terminator/css/bootstrap.css" rel="stylesheet" />

<script src="/Terminator/js/angular-animate.min.js">
	
</script>
<script src="/Terminator/js/toaster.min.js">
	
</script>
<script src="/Terminator/js/ui-bootstrap-tpls.js"></script>
<link href="/Terminator/css/toaster.min.css" rel="stylesheet" />
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.exedit-3.5.js"></script>

</head>
<body ng-app='testCaseApp' ng-controller='testCaseCtrl'
	data-ng-init="init()">
	<div align="center">
		<toaster-container></toaster-container>
	</div>
	<div id="selectResult"
		style="height: 100%; width: 100%; overflow-x: visible; overflow-y: visible;">
		<div class=" rowcol-md-12 panel panel-primary " style="height: 100%">
			<!--搜索工具栏开始-->
			<div class="input-group col-md-4 pull-right testCaseSelectMain"
				style="width: 100%; height: 15%">
				<div style="width: 23%; height: 100%; float: left;">
					<div class="testCaseSelect">
						<span class="selectDiv" style="line-height: 30px; width: 30%">开始：</span>
						<div class='input-group date' id='datetimepicker1'>
							<input type='text' class="form-control" id="datetimebegin"
								ng-model='beginTime' style="width: 100px;" readonly="readonly" />
							<span class="input-group-addon" style="width: 0%;"> <span
								class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<div class="testCaseSelect">
						<span class="selectDiv" style="line-height: 30px; width: 30%">结束：</span>
						<div class='input-group date' id='datetimepicker2'>
							<input type='text' class="form-control" id="datetimeend"
								ng-model='endTime' style="width: 100px;" readonly="readonly" />
							<span class="input-group-addon" style="width: 0%;"> <span
								class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
				</div>
				<div style="width: 27%; float: left; height: 100%;">
					<div class="testCaseSelect">
						<div class="isPublicClass" style="width: 30%;">
							<span class="isPublicText" style="line-height: 30px;">高管</span><input
								type="checkbox" ng-model='boss' ng-click='examine(1,boss)'
								style="margin: 0;">
						</div>
						<div class="isPublicClass" style="width: 30%;">
							<span class="isPublicText" style="line-height: 30px;">经理</span><input
								type="checkbox" ng-model='manager' style="margin: 0;"
								ng-click='examine(2,manager)'>
						</div>
						<div class="isPublicClass">
							<span class="isPublicText" style="line-height: 30px;">员工</span><input
								type="checkbox" ng-model='staff' style="margin: 0;"
								ng-click='examine(3,staff)'>
						</div>
					</div>
					<div class="testCaseSelect">
						<div class="isPublicClass">
							<span class="isPublicText" style="line-height: 30px;">只看自己</span><input
								type="checkbox" ng-model='onlySeeSelf' style="margin: 0;"
								ng-click=''>
						</div>
					</div>
				</div>
				<div style="width: 20%; float: left; height: 100%;">
					<div class="testCaseSelect" style="float: left; width: 100%;">
						<input type="text" id='checkoutPerson' placeholder="请选择需要查看的人员"
							readonly="readonly" class="form-control selectText"
							maxlength="20" size="20" style="height: 100%; width: 100%;"
							ng-click='selectPersonal()' />
					</div>
					<div
						style="left: 666px; top: 40px; position: fixed; z-index: 100; display: none;"
						class="" id="aa">
						<div class="zTreeDemoBackground left">
							<ul id="treeDemo" class="ztree"></ul>
						</div>
					</div>
					<div class="testCaseSelect" style="float: left; width: 100%;">
						<input type="text" placeholder="请输入要搜索的关键字，模糊查询"
							class="form-control selectText" ng-model="selectKeyword"
							maxlength="20" size="20" style="height: 100%; width: 100%;" />
					</div>
				</div>
				<div style="width: 30%; float: left; height: 100%;">
					<div class=" testCaseSelect testCaseBtn"></div>
					<div class=" testCaseSelect testCaseBtn">
						<button type="button" class="btn btn-info" ng-click='selectCase()'>查询</button>
						<button type="button" class="btn btn-info btn_add"
							ng-click="addTestCase()">增加</button>
					</div>
				</div>
			</div>
			<!--搜索工具栏结束-->
			<!--绑定表格开始-->
			<div
				style="width: 100%; height: 85%; overflow: scroll; overflow-x: hidden;">
				<table id="tb" border="1" cellspacing="0"
					style="table-layout: fixed; width: 100%"
					class="table table-striped table-bordered table-hover table-responsive">
					<tr>
						<th style="width: 5%">选择</th>
						<th style="width: 8%">用例分类</th>
						<th style="width: 8%">功能概括</th>
						<th style="width: 8%">功能名称</th>
						<th style="width: 20%">操作步骤</th>
						<th style="width: 10%">预期结果</th>
						<th style="width: 6%">备注</th>
						<th style="width: 8%">添加人</th>
						<th style="width: 6%">归属</th>
						<th style="width: 8%">审核状态</th>
						<th style="width: 10%">添加时间</th>
						<th style="width: 10%">操作</th>
						<!--<th>编辑</th>  
                                <th>删除</th>-->
					</tr>
					<!--重复项开始，设置排序字段，数据源，names代表数据源，x表示names中遍历的每一个对象，id表示模糊搜索输入的内容，要与输入的input的ng-model一致，col表示排序名称，要与表头中一致-->
					<tr ng-repeat="x in testCases | filter: selectKeyword ">
						<td><input type="checkbox" name="cbx" value="{{x.caseid}}"
							ng-model='selectAll' ng-click="isSelected(x,selectAll)"
							ng-checked="selectAll" ng-show='isShowSelect(x.ispublic)' /></td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.sortname}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.functionname}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.funchildname}}</td>
						<td ng-click="show(x.step)"
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.step}}</td>
						<td ng-click="show(x.expectresult)"
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.expectresult}}</td>
						<td ng-click="show(x.remark)"
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.remark}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.name}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.ispublic}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.examine}}</td>
						<td ng-click="show(x.addtime)"
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.addtime}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">
							<button class="btn-mine" ng-click="askExamine(x,isExamineBtn(x))"
								ng-show='isShowExamine'>{{isExamineBtn(x)}}</button>
							<button ng-click="editTestCase(x)" ng-show='isShowExamine'>编辑</button>
						</td>
					</tr>

				</table>
				<div class="row-fluid" ng-show="isShowPage">
					<div class="span6" style="width: 48.717948717948715%;">
						<div class="dataTables_info" id="sample_1_info">显示{{start}}
							到{{end}}&nbsp;&nbsp;&nbsp;&nbsp; 共查询到{{resultAllLength}}条数据</div>
					</div>
					<div class="span6"
						style="width: 48.717948717948715%; margin-top: -5px;">
						<div class="dataTables_paginate paging_bootstrap pagination"
							style="margin: 0; float: right;">
							<ul>
								<li class="prev " ng-class="{'disabled':p_current==1}"><a
									ng-click="load_page(page-1)" href="javascript:void(0);">← <span
										class="hidden-480">上一页</span>
								</a></li>
								<%-- <li ng-if="p_current >= 5 && pageCount !== 5"><a
									href="javascript:void(0)">...</a></li>
								<li ng-repeat="page in pages"
									ng-class="{'active':p_current==page}"><a
									href="javascript:void(0);" ng-click="load_page(page)">{{page}}</a></li>
								<li ng-if="pageCount > 5 && 1 <= pageCount - 5"><a
									href="javascript:void(0)">...</a></li> --%>
								<li ng-if="page >= pageNum && lastPage !== pageNum"
									ng-click="load_page(1)" ng-class="{active:item==1}"><a
									href="javascript:void(0)">1</a></li>
								<li ng-if="page >= pageNum && lastPage !== pageNum"><a
									href="javascript:void(0)">...</a></li>
								<li ng-class="{active:item==page}" ng-repeat="item in pages"><a
									href="javascript:void(0)" ng-click="load_page(item)">{{item}}</a></li>
								<li
									ng-if="pageCount > pageNum && firstPage <= pageCount - pageNum">
									<a href="javascript:void(0)">...</a>
								</li>
								<li
									ng-if="pageCount > pageNum && firstPage <= pageCount - pageNum"
									ng-click="load_page(pageCount)" ng-class="{active:item==page}"><a
									href="javascript:void(0)">{{pageCount}}</a></li>
								<li class="next" ng-class="{'disabled':p_current==pageCount}"><a
									href="javascript:void(0);" ng-click="load_page(page+1)"><span
										class="hidden-480">下一页</span> → </a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!--绑定表格结束-->
			<popup ng-show="isShow">
			<div class="mod-popup-example">{{showText}}</div>
			</popup>
		</div>
	</div>

	<div class="overlay" id="spm" style="display: none;"></div>
	<!-- 编辑用例弹出框 -->
	<div class="oneKeyTestCase" style="display: none">
		<!-- 隐藏div -->
		<div class="Popup_top">
			<input type="button" value="关闭" id="copy_btn" class="ClosePopu"
				align="middle" style="float: left;" ng-click='oneKeyTestCaseClose()' />
			<input type="button" value="复制" class="ClosePopu" align="middle"
				style="float: left;" ng-click='copyTestCase()' />
		</div>
		<div class="Popup_cen">
			<textarea class='copyText' style="width: 700px; height: 400px"
				ng-model='testCaseMsg'></textarea>
		</div>
	</div>
	<!-- 编辑用例弹出框 -->
	<div class="PopupEdit" style="display: none">
		<!-- 隐藏div -->
		<div class="Popup_top">
			<input type="button" value="关闭" class="ClosePopu" align="middle"
				style="float: left;" ng-click='pupuEditClose()' /> <input
				type="button" value="提交" class="ClosePopu" align="middle"
				style="float: left;" ng-click='EditCase()' />
		</div>
		<div class="Popup_cen">
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				class="BD_tab">
				<tr>
					<td style="width: 110px;" align="right">用例分类:</td>
					<td><select ng-model="sortEdit"
						ng-options="x.sortid as x.sortname for x in sorts"
						ng-change='sortChange("edit")'>
					</select><font color="red">*</font></td>
				</tr>
				<tr>
					<td style="width: 110px;" align="right">功能概括:</td>
					<td><select ng-model="funcEdit"
						ng-options="x.functionid as x.functionname for x in re_sort_funcEdit">
					</select><font color="red">*</font></td>
				</tr>
				<tr>
					<td style="width: 110px;" align="right">功能名称:</td>
					<td><input type="text" ng-model='funchildnameEdit'> <font
						color="red">*</font></td>
				</tr>
				<tr>
					<td style="width: 110px;" align="right">操作步骤:</td>
					<td><textarea ng-model='stepEdit'
							style="height: 100; width: 300; word-wrap: break-word;"></textarea>
						<font color="red">*</font></td>
				</tr>
				<tr>
					<td style="width: 110px;" align="right">预期结果:</td>
					<td><input id="name" ng-model='expectresultEdit'> <font
						color="red">*</font></td>
				</tr>
				<tr>
					<td style="width: 110px;" align="right">备注:</td>
					<td><input type="text" ng-model='remarkEdit'></td>
				</tr>
			</table>
		</div>
	</div>
	<!-- 添加用例弹出框 -->
	<div class="Popup"
		style="display: none; margin-top: -250px; margin-left: -666px; width: 1270px;">
		<!-- 隐藏div -->
		<div class="Popup_top">
			<input type="button" value="关闭" class="ClosePopu" align="middle"
				style="float: left;" ng-click='pupuClose()' /> <input type="button"
				value="提交" class="ClosePopu" align="middle" style="float: left;"
				ng-click='addWeekPlan()' /> <input type="button" value="新增"
				class="ClosePopu" align="middle" style="float: left;"
				ng-click='addNewPlan()' /> <input type="button" value="删除"
				class="ClosePopu" align="middle" style="float: left;"
				ng-click='deleteNewPlan()' />
			<div
				style="float: left; width: 50%; left: 330px; line-height: 13px; position: fixed; z-index: 100;">
				<span style="color: blue; font-size: 12px;">{{edittext}}</span>
			</div>
			<div style="float: right;">当前总权重为{{totalquanzhong}}%，您的自评分为{{totalselfper}}，上级评分为{{totalbossper}}</div>
		</div>


		<div class="Popup_cen" style="padding-top: 0px;">
			<table id="tb" border="1" cellspacing="0"
				style="table-layout: fixed; width: 100%"
				class="table table-striped table-bordered table-hover table-responsive">
				<tr>
					<th style="width: 10%; padding: 0px;">周工作目标</th>
					<th style="width: 7%; padding: 0px;">目标来源</th>
					<th style="width: 12%; padding: 0px;">关键结果分析</th>
					<th style="width: 5%; padding: 0px;">支撑人</th>
					<th style="width: 4%; padding: 0px;">权重%</th>
					<th style="width: 6%; padding: 0px;">完成标准</th>
					<th style="width: 6%; padding: 0px;">开始日期</th>
					<th style="width: 6%; padding: 0px;">完成日期</th>
					<th style="width: 5%; padding: 0px;">效率自评</th>
					<th style="width: 5%; padding: 0px;">效果自评</th>
					<th style="width: 4%; padding: 0px;">自评分</th>
					<th style="width: 8%; padding: 0px;">结果说明</th>
					<th style="width: 5%; padding: 0px;">效率总评</th>
					<th style="width: 5%; padding: 0px;">效果总评</th>
					<th style="width: 5%; padding: 0px;">上级评分</th>
					<th style="width: 8%; padding: 0px;">上级评语</th>
					<!--<th>编辑</th>  
                                <th>删除</th>-->
				</tr>
				<!--重复项开始，设置排序字段，数据源，names代表数据源，x表示names中遍历的每一个对象，id表示模糊搜索输入的内容，要与输入的input的ng-model一致，col表示排序名称，要与表头中一致-->
				<tr ng-repeat="z in weekplans | filter: selectKeyword ">
					<td style="padding: 0px;"><textarea rows="1" cols="1"
							style="width: 118px; font-size: 12px; padding: 0px; height: 26px;"
							ng-model='z.weekObject1' ng-change='changeText(z.weekObject1)'
							ng-blur='disText()' ng-click='show(z.weekObject1)'></textarea></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><select
						ng-model="z.resultSource1"
						ng-options="x.name for x in resultSources" style="width: 80px;"></select></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><textarea
							rows="1" cols="1"
							style="width: 144px; height: 26px; font-size: 12px"
							ng-model='z.keyresult1' ng-change='changeText(z.keyresult1)'
							ng-blur='disText()' ng-click='show(z.keyresult1)'></textarea></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><textarea
							rows="1" cols="1"
							style="width: 60px; height: 26px; font-size: 12px"
							ng-model='z.needpersonal1'
							ng-change='changeText(z.needpersonal1)' ng-blur='disText()'
							ng-click='show(z.needpersonal1)'></textarea></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><input
						type="text" onkeyup="this.value=this.value.replace(/\D/g,'')"
						onafterpaste="this.value=this.value.replace(/\D/g,'')"
						maxlength="3" size="14" style="width: 40px;"
						ng-model='z.keyresultper1' ng-blur='getselfper(z,0)' /></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><textarea
							rows="1" cols="1"
							style="width: 70px; height: 26px; font-size: 12px"
							ng-model='z.keyresultstand1'
							ng-change='changeText(z.keyresultstand1)' ng-blur='disText()'
							ng-click='show(z.keyresultstand1)'></textarea></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;">
						<div>
							<input type="text"
								onkeyup="this.value=this.value.replace(/\D/g,'')"
								onafterpaste="this.value=this.value.replace(/\D/g,'')"
								maxlength="2" size="14" style="width: 25px;"
								ng-model='z.beginmonth1' /> <span>-</span><input type="text"
								onkeyup="this.value=this.value.replace(/\D/g,'')"
								onafterpaste="this.value=this.value.replace(/\D/g,'')"
								maxlength="2" size="14" style="width: 25px;"
								ng-model='z.begindate1' />
						</div>
					</td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><div>
							<input type="text"
								onkeyup="this.value=this.value.replace(/\D/g,'')"
								onafterpaste="this.value=this.value.replace(/\D/g,'')"
								maxlength="2" size="14" style="width: 25px;"
								ng-model='z.endmonth1' /> <span>-</span><input type="text"
								onkeyup="this.value=this.value.replace(/\D/g,'')"
								onafterpaste="this.value=this.value.replace(/\D/g,'')"
								maxlength="2" size="14" style="width: 25px;"
								ng-model='z.enddate1' />
						</div></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><select
						ng-options="x.name for x in efficiencys" style="width: 55px;"
						ng-model='z.efficiency1' ng-change='getselfper(z,1)'></select></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><select
						ng-model='z.effect1' ng-options="x.name for x in effects"
						style="width: 50px;" ng-change='getselfper(z,1)'></select></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><input
						type="text" maxlength="4" size="14" style="width: 40px;"
						readonly="readonly" ng-model='z.selfper1' id='selfper1' /></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><textarea
							rows="1" cols="1"
							style="width: 95px; height: 26px; font-size: 12px"
							ng-model='z.resultremark1'
							ng-change='changeText(z.resultremark1)' ng-blur='disText()'
							ng-click='show(z.resultremark1)'></textarea></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><select
						ng-options="x.name for x in efficiencys" style="width: 55px;"
						ng-model='z.efficiencyboss1' ng-change='getselfper(z,2)'></select></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><select
						ng-options="x.name for x in effects" style="width: 50px;"
						ng-model='z.effectboss1' ng-change='getselfper(z,2)'></select></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><input
						type="text" maxlength="4" size="14" style="width: 40px;"
						readonly="readonly" ng-model='z.bossper1' id="bossper1" /></td>
					<td
						style="padding: 0px; overflow: hidden; white-space: nowrap; text-shadow: gray;"><textarea
							rows="1" cols="1"
							style="width: 95px; height: 26px; font-size: 12px"
							ng-model='z.bossremark1' ng-change='changeText(z.bossremark1)'
							ng-blur='disText()' ng-click='show(z.bossremark1)'></textarea></td>
				</tr>

			</table>
		</div>
	</div>
</body>
</html>
